@keyframes fx-animation-message-enter {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@keyframes fx-animation-message-leave {
  from {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  to {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
}

.fx-message {
  max-width: 80%;
  min-width: 300px;
  position: fixed;
  z-index: 1002;
  left: 50%;
  transform: translateX(-50%);
  height: $height-large;
  line-height: $height-large;
  padding: 0 30px;
  border-radius: $border-radius-default;
  color: $message-font-color;
  transition: top 0.3s;
  animation: fx-animation-message-enter 0.3s forwards;
  @extend .text_hide;

  &.center {
    text-align: center;
  }

  &.close {
    animation: fx-animation-message-leave 0.3s forwards;
  }

  &.primary {
    background-color: $color-primary;
  }

  &.success {
    background-color: $color-success;
  }

  &.warning {
    background-color: $color-warning;
  }

  &.error {
    background-color: $color-error;
  }

  > span {
    cursor: pointer;
    display: inline-block;
    width: 10px;
    height: 10px;
    line-height: 10px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
}
